{
	time = $1;
	device = $2;
	nb_if = $3;
	eventName = $4;

	if (eventName=="EVENT_TYPE_NEIGHBOR_INTERFACE_DOWN" && upTime>0 && nb_if==upInterface) {
		print time-upTime; 
		upInterface = 0;
		upTime = 0;
	}

	if (eventName=="EVENT_TYPE_NEIGHBOR_INTERFACE_UP") {
		upInterface = nb_if;
		upTime = time;
	};
}